<template>
	<view>
		<view class="form" v-if="form">
			<view class="formitem">
				<view class="label">
					公司
				</view>
				<view class="input">
					{{form.company}}
				</view>
			</view>
			<view class="formitem">
				<view class="label">
					个人
				</view>
				<view class="input">
					{{form.porson}}
				</view>
			</view>
			<view class="formitem">
				<view class="label">
					数量
				</view>
				<view class="input">
					{{form.num}}
				</view>
			</view>
			<view class="formitem">
				<view class="label">
					联系方式
				</view>
				<view class="input">
					{{form.phone}}
				</view>
			</view>
		</view>
		
		<view class="tips" v-else>
			暂无记录
		</view>
	</view>
</template>

<script>
	import {lastRecordWater} from '@/api/home.js'
	export default {
		data() {
			return {
				form: {},
				type:''
			};
		},
		onLoad(o) {
			this.type=o.type
			uni.setNavigationBarTitle({
				title:decodeURI(o.type)
			})
			lastRecordWater({type:this.type}).then(res=>{
				// console.log(res)
				this.form=res.data.data
			})
			
			
		}
	}
</script>

<style lang="less">
	.form {
		border-top: #F4F6F8 solid 2rpx;
		padding: 6rpx 28rpx 0 31rpx;

		.formitem {
			height: 99rpx;
			display: flex;
			align-items: center;
			border-bottom: 1rpx solid #F4F6F8;
			padding: 0 2rpx 0 10rpx;
			font-size: 30rpx;
			color: #333333;

			.label {
				width: 211rpx;
				font-weight: bold;
			}

			.input {
				flex: 1;
			}

			.placeholder {
				font-size: 30rpx;
				color: #8B8B8B;
			}

			.more_icon {
				width: 21rpx;
				height: 31rpx;
			}
		}

		.form_title {
			height: 96rpx;
			display: flex;
			align-items: center;

			.line {
				width: 8rpx;
				height: 28rpx;
				background: #FE712A;
				border-radius: 4rpx;
				margin-right: 10rpx;
			}
		}
	}
	.tips{
		text-align: center;
	}
</style>
